﻿@model IRIS.Models.LinkViewModel

@{
    ViewBag.Title = "Create";
}

<h2>Búa til nýjan hlekk</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Link</legend>

        <div class="editor-label">
           Titill
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.m_link.Title)
            @Html.ValidationMessageFor(model => model.m_link.Title)
        </div>

        <div class="editor-label">
            Slóð, verður að hafa www fremst. T.d www.mbl er rétt
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.m_link.URL)
            @Html.ValidationMessageFor(model => model.m_link.URL)
        </div>

        <div class="editor-label">
            Lýsing á hlekk
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.m_link.Description)
            @Html.ValidationMessageFor(model => model.m_link.Description)
        </div>

        <div class="editor-label">
            Flokkur
        </div>
       <div class="editor-field">
       @Html.DropDownListFor(model => model.m_link.CID, new SelectList(Model.m_linkCategories,"ID", "Name"))
       </div>
       
       

        <p>
            <input type="submit" value="Búa til" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>
